<script setup lang="ts">
import { watch } from 'vue';

import router from '@/app-router';
import { useUpdateChecker } from '@/features/app-updater/composables/use-update-checker';

const { updateChecked, updateAvailable } = useUpdateChecker();

watch(updateChecked, (checked) => {
  if (checked) {
    router.replace(updateAvailable.value ? '/app-updater' : '/home');
  }
});
</script>

<template>
  <div class="main-container">
    <img src="/tauri.svg" />
  </div>
</template>

<style scoped>
.main-container {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

img {
  width: 60px;
}
</style>
